package spittr.web.controlleradvice;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import spittr.exception.SpitterNotFoundException;


/**
 * 为所用控制器增强功能
 */
@ControllerAdvice
public class MyControllerAdvice {

    /**
     * 添加异常处理器
     * @return
     */
    @ExceptionHandler(value = {SpitterNotFoundException.class})
    public String handlerSpitterNotFoundException(){
        return "error/spitterNotFound";
    }

}
